/*
 * ========================================================
 * Copyright(c) 2014 杭州偶尔科技-版权所有
 * ========================================================
 * 本软件由杭州偶尔科技所有, 未经书面许可, 任何单位和个人不得以
 * 任何形式复制代码的部分或全部, 并以任何形式传播。
 * 公司网址
 * 
 * 			http://www.kkkd.com/
 * 
 * ========================================================
 */
package com.simon.mengkou.ui.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.facebook.drawee.view.SimpleDraweeView;
import com.simon.mengkou.R;
import com.simon.mengkou.data.bean.base.Tag;
import com.simon.mengkou.data.bean.base.User;
import com.simon.mengkou.system.global.OuerApplication;
import com.simon.mengkou.ui.view.FollowButton;
import com.simon.mengkou.utils.UtilOuer;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * @author : Zhenshui.Xia
 * @since : 2016/3/16.
 * desc    : 搜索标签结果适配器
 */
public class SearchTagAdapter extends AbsAdapter<Tag> {

    public SearchTagAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup arg2) {
        final Holder holder;
        if (null == convertView) {
            convertView = mInflater.inflate(R.layout.layout_search_tag_item, null);
            holder = new Holder();
            convertView.setTag(holder);
            ButterKnife.bind(holder, convertView);
        } else {
            holder = (Holder) convertView.getTag();
        }

        final Tag data = getItem(position);
        //设置标签名
        holder.mTvName.setText(data.getName());
        return convertView;
    }


    /**
     * @author zhenshui.xia
     */
    class Holder {
        //标签名
        @Bind(R.id.tag_id_name)
        TextView mTvName;
    }

}
